/**  
 * All rights Reserved, Designed By www.woniuxy.com
 * @Title:  Account.java   
 * @Package com.woniu.domain   
 * @Description:    Description  
 * @author: 蜗牛学院  
 * @date:   2019年9月18日 下午9:07:46
 * @user:   Administrator  
 * @version V1.0 
 * @Copyright: 2019 www.woniuxy.com Inc. All rights reserved. 
 * 注意：本内容仅限于成都蜗牛创想科技有限公司，禁止外泄以及用于其他的商业目
 */ 
package com.woniu.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.woniu.entity.Student;

/**
 * @author Administrator
 *
 */
public interface StudentRepository extends JpaRepository<Student, Integer>{
	//单一jpa查询
	public List<Student> findBySex(String sex);
	//jpql查询
	@Query("select s from Student s  where s.name=:name")
	public List<Student> findByName(@Param("name") String name);
	//sql查询
	@Query(value="select * from student where department=:depart",nativeQuery = true)
	public List<Student> findByDepartment(@Param("depart") String depart);
}
